﻿<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport"
		  content="target-densitydpi=device-dpi, width=device-width,height=device-height, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0,shrink-to-fit=no" />
	<meta name="format-detection" content="telephone=no" />
	<!--em标准js代码，请放在页面的最上方，前面最好不要再有JS代码或JS文件-->
	<script type="text/javascript" src="/js/rem.js"></script>
	<link type="text/css" rel="stylesheet" href="/css/css.css" />
	<title>东易日盛装饰开业盛典</title>
	<link rel="stylesheet" type="text/css" href="/swiper/swiper.min.css" />
	<link rel="stylesheet" type="text/css" href="/swiper/swiper_style.css" />
	<link rel="stylesheet" type="text/css" href="/css/lottery.css" />
	<link type="text/css" rel="stylesheet" href="/css/style.css" />
	<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
	<script src="/swiper/swiper.min.js"></script>
</head>

<style>
	.raffled{
		text-align: center;
		background-color: #FFF2EE;
		height:2.2rem;
		z-index: 999999999;
		background-image: none;
		color: #242a4c;
		border-radius:10px;
		width: 94%;
	}
	.goPlan{
		display: block;
		width: 4rem;
		height: 1rem;
		line-height: 1rem;
		margin:0.5rem auto;
		text-align: center;
		background-color: #FFF2EE;
		color: black;
		font-size: 16px;
		font-weight: bold;
		border-radius: .5rem;
		margin-top: 2rem;
	}
</style>

<body>

<div class="header">
	<a href="javascript:history.go(-1);" class="backa"></a>

	<a href="javascript:;" class="seta"></a>
</div>

<div class="draw-title">
	<div class="draw-title1">报名成功</div>
	<div class="draw-title2" id="userId">你的用户编号为:</div>
	<div class="draw-title3" id="cjResult">您的抽奖机会已用完，感谢参与！</div>
	<input type="hidden" id="hide">
</div>

<input type="hidden" id="userId0">

<div class="lottery">
	<div class="shanDeng raffled" id="deng">
		<img src="/images/result.png" alt="" /><br>
		<span id="prizeDes">您获得的奖品是：</span>
	</div>


</div>


<div class="award-tip" id="explain" style="color: #fff;">
	<div class="left" style="color: #fff;">领奖说明：</div>
	<div class="right" style="color: #fff;">兑奖条件：<br>1.抽奖人必须有新房未装修<br>
		2.报名即可参与抽奖<br>
		兑奖时间：6月26号前，客户量房后领取。</div>
</div>

<div id="plan">
	<a href="javascript:;" class="goPlan" id="bmBtn" onclick="myplan();">查看我的施工计划</a>
</div>

<img src="/images/bodysd.jpg" alt="" class="sd">

<script type="text/javascript" src="/js/base.js"></script>
<script type="text/javascript" src="/js/popups.js"></script>
<!-- <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script> -->
<script>
	$(function () {
		getResultByUserId();
	});
	function getResultByUserId() {
		$.ajax({
			url:"/result/twiceGetResultByUserId",
			method:"get",
			data:"",
			success:function (data){
				var customer=data.customer;
				var result=data.result;
				$("#userId").text("你的用户编号为:"+customer.userId)
				$("#hide").val(customer.userId)
				if(customer.isContract==0){
					$("#plan").hide()
				}
				if(customer.isContract==1){
					$("#plan").show()
				}
				if(customer.status==3){
					jqtoast("您的奖品已领取");
				}
				$.ajax({
					url:"/prize/getPrizeById",
					method:"post",
					data:{
						prizeId:result.prizeId
					} ,
					success:function (data) {
						$("#prizeDes").text("您获得的奖品是："+data.prizeDes);
					}
				})
			}
		})
	}

	function myplan() {
		var userId=$("#hide").val();
		location.href="/plan/myPlan/"+userId;
	}



</script>
</body>

</html>